// import { isBankCount2 } from '@/utils/public/validator'
export default {
  namespaced: true,
  state: {
    peoInfo: {
      // 保险人
      chnName: '', // 姓名
      idType: '', // 证件类型
      idNo: '',
      mobile: '',
      // area: ['150000', '150100', '150102'],
      area: [],
      street: '',
      email: '',
      bankId: '',
      cardNo: '',
      remarks: '',
      sex: ''
    },
    ids: []
  },
  mutations: {
    initData(state) {
      state.peoInfo = {
        // 保险人
        chnName: '', // 姓名
        idType: '', // 证件类型
        idNo: '',
        mobile: '',
        // area: ['150000', '150100', '150102'],
        area: [],
        street: '',
        email: '',
        bankId: '',
        cardNo: '',
        remarks: '',
        sex: ''
      }
      state.ids = []
    },
    setCustomerData(state, [prop, value]) {
      state.peoInfo[prop] = value
    },
    setPeoInfo(state, obj) {
      state.peoInfo = obj
    },
    setCustomerIds(state, id) {
      state.ids.push(id)
    }
  }
}
